package com.xauto.pioneer.appuser.model;

import org.json.JSONObject;

/**
 * 会员等级对象
 * Created by Lemon on 22/04/2017.
 */
public class MemberLevel extends BaseModel<MemberLevel> {

    /** 会员等级ID*/
    public String member_level_id;
    /** 会员等级名称*/
    public String member_level_name;
    /** 下级等级百分比(0-1的浮点数)*/
    public String next_level_percent;
    /** 下级等级ID*/
    public String next_member_level_id;
    /** 下级等级名称*/
    public String next_member_level_name;

    @Override
    public MemberLevel parse(JSONObject jsonObject) {
        if(jsonObject != null) {
            member_level_id = jsonObject.optString("member_level_id");
            member_level_name = jsonObject.optString("member_level_name");
            next_level_percent = jsonObject.optString("next_level_percent");
            next_member_level_id = jsonObject.optString("next_member_level_id");
            next_member_level_name = jsonObject.optString("next_member_level_name");
            return this;
        }
        return null;
    }
}
